#define _CRT_SECURE_NO_WARNINGS
#include<stdio.h>
#include<string.h>

int is_rotate(char* str,char* str1,int n)
{
	strncat(str, str, n);
	char*ret=strstr(str, str1);
	return ret != NULL;
}

int main()
{
	char arr[20] = "adios";
	char arr1[] = "iosad";
	int len = strlen(arr);
	int ret = is_rotate(arr,arr1,len);
	if (ret == 1)
		printf("yes\n");
	else
		printf("no\n");
	return 0;
}